package com.voto.sunflower.activity.me;

import retrofit.RetrofitError;
import retrofit.client.Response;
import android.view.View;

import com.voto.sunflower.model.response.UpdateVersionResponse;
import com.voto.sunflower.retrofit.NetworkHandler;

public class UpdateVersion extends NetworkHandler<UpdateVersionResponse> {
	
	private View mLayoutView;
	private UpdateVersionListener mListener;
	
	
	public UpdateVersion() {

	}

	public UpdateVersion(View updateView) {
		mLayoutView = updateView;
	}
	
	@Override
	public void failure(RetrofitError arg0) {
		super.failure(arg0);
	}

	@Override
	public void success(UpdateVersionResponse arg0, Response arg1) {
		super.success(arg0, arg1);
	}
	
	public void setUpdateListener(UpdateVersionListener listener) {
		mListener = listener;
	}

	public void setUpdateView(View updateView) {
		if (null == updateView) {
			throw new IllegalArgumentException("view should not be null");
		}
		mLayoutView = updateView;
	}

	public interface UpdateVersionListener {
		void failure(RetrofitError error);

		void success(View view, UpdateVersionResponse updateVersionRespnse,
				Response response);
	}
	
}
